import request from '@/utils/request'
import {  deletefn1, get, post } from '@/utils/request'

// 招商信息发布
export function getRecruitInfoByRelease(page, limit, statusList) {
    return post('/api-user/tbIssue', {
      page,
      limit,
      statusList
    })
}

export function addRecruitInfo(data) {
    return request({
      url: '/api-user/tbIssue/save',
      method: 'post',
      data
    })
}

export function putRecruitInfoByStatus(data) {
    return request({
      url: '/api-user/tbIssue/updateIssue',
      method: 'put',
      data
    })
  }
  
  export function putRecruitInfoById(data) {
    return request({
      url: '/api-user/tbIssue',
      method: 'put',
      data
    })
  }

  export function delRecruitInfoByIdList(idList, hidList) {
    return deletefn1('/api-user/tbIssue/deleteList', {
        list: idList,
        list2: hidList
    })
  }

  // 审批
export function getRecruitInfoByApproval(page, limit,statusList ) {
    return post('/api-user/tbIssue', {
      page,
      limit,
      statusList
    })
}

export function getRecruitInfoById(id) {
    return post('/api-user/tbIssue', {
      id,
    })
}


export function putRecruitInfoByApproval(data) {
    return request({
      url: '/api-user/tbIssue/updateApproval',
      method: 'put',
      data
    })
  }


  // 未被企业选择的房屋信息  statusList  招商审核完   rentStatus  是否被出租
  export function getHouseInfoByStatus(page, limit, statusList, rentStatus) {
    return post('/api-user/tbIssue', {
      page,
      limit,
      statusList,
      rentStatus
    })
}